fix: repair failing YouTube embeds in comments - #25929
Merged
Merged
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33912 | |
| Version | PR #25929 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | e60eee6 | |
| Installation URL | 0bai6n3p07lmo |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33912 | |
| Version | PR #25929 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | e60eee6 | |
| Installation URL | 47s1dc4vc7jcg |
dcalhoun
marked this pull request as ready for review
August 22, 2026 16:57
dcalhoun
requested review from
crazytonyli
and
a lite review from Copilot
and removed request for
Copilot
August 22, 2026 16:57
crazytonyli
approved these changes
Aug 23, 2026
Contributor
|
Do you think we should target the release branch? |
Member
Author
Yes, you are correct. I often forget about this project's approach to patching current releases. I'll update the target branch to |
Formatting-only change, no behavior difference. Committed separately to keep the following bug fix diff reviewable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43
YouTube requires an HTTP referrer for embedded players. Comment content was loaded with a nil baseURL, so the iframe sent no referrer and the player rendered 'Error 153 - Video player configuration error' instead of the video. Load comment HTML with the same https://wordpress.com/reader base URL that ReaderWebView uses for post content. Fixes #25928 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43
dcalhoun
force-pushed
the
fix/youtube-embeds-in-comments
branch
from
August 24, 2026 12:11
bce96b8 to
e60eee6
Compare
dcalhoun
enabled auto-merge (squash)
August 24, 2026 12:12
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 27, 2026
* fix: repair failing YouTube embeds in comments (#25929) * style: apply swift-format to WebCommentContentRenderer Formatting-only change, no behavior difference. Committed separately to keep the following bug fix diff reviewable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43 * fix: send HTTP referrer for YouTube embeds in comments YouTube requires an HTTP referrer for embedded players. Comment content was loaded with a nil baseURL, so the iframe sent no referrer and the player rendered 'Error 153 - Video player configuration error' instead of the video. Load comment HTML with the same https://wordpress.com/reader base URL that ReaderWebView uses for post content. Fixes #25928 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43 * chore: add release note for YouTube comment embed fix Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43 --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * Merge release_notes/27.2 into release/27.2 (#25936) * Add editorialized release notes * Update metadata strings * Update metadata strings --------- Co-authored-by: Tony Li <tony.li@automattic.com> --------- Co-authored-by: David Calhoun <github@davidcalhoun.me> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: WordPress Mobile Bot Account <mobile+wpmobilebot@automattic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
YouTube videos embedded in Reader comments failed to play, showing "Error 153 — Video player configuration error" instead of the video.
YouTube's Required Minimum Functionality terms require embeds to send an HTTP referrer.
WebCommentContentRendererloaded comment HTML with anilbase URL, which gives the document anabout:blankorigin, so the embed iframe sent noRefererheader and the player refused to load.This is the same root cause as #24984, which fixed post content in
ReaderWebView. That fix set a real base URL but was never applied to the comment renderer. This PR loads comment HTML with the samehttps://wordpress.com/readerbase URL, so embeds behave consistently in posts and comments.Fix #25928. Fix CMM-2349.
Commits
style:applies swift-format to the file, no behavior change — split out so the fix diff stays reviewable.fix:the actual change, 8 lines.Testing instructions
Verified on device: Jetpack 27.2, iPhone 17, iOS 26.6.1.